package validate

import (
	"gin/common"
	"github.com/Gre-Z/common/jtime"
)

type AddSentenceWordWrapper struct {
	Data AddSentenceWord `json:"data" binding:"required"`
}

type UpdateSentenceWordWrapper struct {
	Data UpdateSentenceWord `json:"data" binding:"required"`
}
type UpdateSentenceWord struct {
	Id          uint64           `json:"id" binding:"required"`
	BeginOffset uint64           `json:"begin_offset" binding:"required,min=0"`
	Word        string           `json:"word" binding:"required,max=255"`
	Length      uint64           `json:"length" binding:"min=0"`
	Pos         string           `json:"pos" binding:"required,max=128"`
	SentenceId  uint64           `json:"sentence_id" binding:"required,min=0"`
	Created     jtime.TstampTime `json:"created"`
}

type AddSentenceWord struct {
	Id          uint64           `json:"id"`
	BeginOffset uint64           `json:"begin_offset" binding:"required,min=0"`
	Word        string           `json:"word" binding:"required,max=255"`
	Length      uint64           `json:"length" binding:"min=0"`
	Pos         string           `json:"pos" binding:"required,max=128"`
	SentenceId  uint64           `json:"sentence_id" binding:"required,min=0"`
	Created     jtime.TstampTime `json:"created"`
}

type SelectSentenceWordQuery struct {
	Param common.QueryParam `json:"param" binding:"required"`
}

type QuerySimilarWords struct {
	Param   common.QueryParam `json:"param" binding:"required"`
	Number  uint64            `json:"number" binding:"required"`
	IsAsync string            `json:"is_async" binding:"oneof=yes no"`
}

type DeleteSentenceWordParam struct {
	Param common.Filter `json:"param" binding:"required"`
}
